<?php
// +---------------------------------------------
// | Name: 星空框架 栏目验证规则
// +---------------------------------------------
// | Version: V5.0
// +---------------------------------------------
// | Author: xkyinzhe <zhonghuaxinxing@sina.cn>
// +---------------------------------------------
// | Time: 2021-05-28 16:00
// +---------------------------------------------
declare(strict_types=1);

namespace app\common\validate;

use  app\common\model\Config as ConfigModel;
use think\Validate;

/**
 * @xk 栏目验证规则
 */
class Cate extends Validate
{
  protected $rule = [
    'cate_id' => 'require|number',
    'cate_name' => 'require',
    'linkurl' => 'require',
    'type' => 'require|number|gt:0'
  ];

  protected $message = [
    'cate_id' => '请选择需要操作的栏目',
    'cate_name' => '请输入栏目名称',
    'linkurl' => '请填写栏目链接',
    'type' => '请选择栏目类型'
  ];
  protected $scene = [
    'create' => ['cate_name','type'],
    'edit' => ['cate_id','cate_name','type']
  ];
}
